package com.hst.web.sys.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author yangshankun
 * @desc filter配置
 * @date 2024/4/28 0:05
 */

@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean<ReferFilter> referFilterRegistration() {
        FilterRegistrationBean<ReferFilter> registration = new FilterRegistrationBean();
        registration.setFilter(new ReferFilter());
        registration.addUrlPatterns("/upload/*");
        return registration;
    }
}
